home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / GRAPHICS / RAYTRACING / POVRAY-2.2 / SCENES / level1 / CLIPTST2 < prev    next >
Text File  |  1993-09-28  |  3KB  |  100 lines

  1. // Persistence Of Vision raytracer version 2.0 sample file.
  2. // Demonstrates clipped_by
  3.  
  4. #include "colors.inc"           // Standard colors library
  5. #include "textures.inc"         // LOTS of neat textures.  Lots of NEW textures.
  6.  
  7. camera {
  8.    location <2.0, 4, -4>
  9.    direction <0.0, 0.0, 1.0>
  10.    up  <0.0, 1.0, 0.0>
  11.    right <4/3, 0.0, 0.0>
  12.    look_at <0, 0, 0>
  13. }
  14.  
  15.  
  16. // Light source
  17. #declare Grayscale = 0.25
  18. #declare AmbientLight = color red Grayscale green Grayscale blue Grayscale
  19.  
  20. light_source { <-20, 30, -100> color White }
  21.  
  22. light_source { <50, 50 ,15> color AmbientLight }
  23.  
  24.  
  25. // A hollow sphere using a clipping plane.  This sphere has no "thickness"
  26. // to its walls,  no matter what the scaling.
  27. sphere { <0, 0, 0>, 1
  28.    clipped_by { plane { <0, 1, 0>, 0.25 } }
  29.  
  30.    finish {
  31.       Phong_Glossy
  32.       ambient 0.2
  33.    }
  34.  
  35.    pigment {
  36.       gradient <1, 1, 1>
  37.       // Notice the -1 to +1 color range.  This is just to demonstrate
  38.       // that this is a valid form for a color map.  It's not really
  39.       // neccessary in this case to do it this way, but thought I'd
  40.       // use it for instructional value.
  41.       color_map {
  42.          [-1.0 0.0 color Yellow color Cyan ]
  43.          [ 0.0 1.0 color Cyan color Magenta]
  44.       }
  45.       scale <0.1, 0.1, 0.1>
  46.    }
  47.  
  48.    bounded_by { sphere { <0, 0, 0>, 1.001 } }
  49.    translate <-2, 1, 0>
  50. }
  51.  
  52. // Hollow sphere done with intersection.
  53. intersection {
  54.    sphere { <0, 0, 0>, 1 }                // outer wall
  55.    sphere { <0, 0, 0>, 0.85 inverse }     // inner wall
  56.    plane { <0, 1, 0>, 0.25 }              // top surface
  57.  
  58.    finish {
  59.       Phong_Glossy
  60.       ambient 0.2
  61.    }
  62.    pigment {
  63.       leopard
  64.       color_map {
  65.          [0.0   0.10 color Yellow color Red ]
  66.          [0.10  0.98 color Red color Blue ]
  67.          [0.98  1.00 color Magenta color Yellow  ]
  68.       }
  69.       //        scale <0.05, 1.0, 0.05>
  70.       scale <0.025, 1.0, 0.025>
  71.    }
  72.  
  73.    bounded_by { sphere { <0, 0, 0>, 1.001 } }
  74.    translate <2, 1, 0>
  75. }
  76.  
  77. // Flat-topped sphere/plane intersection
  78. intersection {
  79.    sphere { <0, 0, 0>, 1 }               // outer wall
  80.    plane { <0, 1, 0>, 0.25 }             // top surface
  81.  
  82.    finish {
  83.       Phong_Glossy
  84.       ambient 0.2
  85.    }
  86.    pigment {
  87.       onion
  88.       turbulence 10                      // try with 0 turb, too!
  89.       octaves 2
  90.       color_map {
  91.          [0.0   0.30 color Yellow color Orange ]
  92.          [0.30  0.90 color Orange color Magenta ]
  93.          [0.90  1.00 color Blue color Green    ]
  94.       }
  95.    }
  96.  
  97.    bounded_by { sphere { <0 0 0> 1.001 } }
  98.    translate <0, 1, -1>
  99. }
  100.